package xuanke;

public class Course {
    private String id;         // 课程编号
    private String name;       // 课程名称
    private String location;   // 上课地点
    private String time;       // 上课时间
    private Teacher teacher;   // 授课教师（关联教师对象）

    // 构造方法：初始化课程基本信息
    public Course(String id, String name, String location, String time) {
        this.id = id;
        this.name = name;
        this.location = location;
        this.time = time;
    }

    // Getter和Setter方法（用于访问和修改属性）
    public String getId() { return id; }
    public String getName() { return name; }
    public String getLocation() { return location; }
    public String getTime() { return time; }
    public Teacher getTeacher() { return teacher; }
    public void setTeacher(Teacher teacher) { this.teacher = teacher; }
}
